package com.bwie.controller;

import com.bwie.mapper.TbBrandMapper;
import com.bwie.pojo.TbBrand;
import com.bwie.service.TbBrandService;
import com.bwie.utils.R;
import com.bwie.vo.PageInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: zhaijiaqi
 * @Date: 2025/7/19 08:38
 * @Description:
 **/
@RestController
@RequestMapping("/prod/brand")
public class BrandController {
    @Autowired
    TbBrandService tbBrandService;

    /**
     * 品牌列表
     * @return
     */
    @PostMapping("/getBrandList")
    public R getBrandList(@RequestBody PageInfoVo pageInfoVo){
        return tbBrandService.getBranPage(pageInfoVo);
    }

    /**
     * 添加品牌
     * @param tbBrand
     * @return
     */
    @PostMapping("/getAddBrand")
    public R getAddBrand(@RequestBody TbBrand tbBrand){
    return tbBrandService.getAddBrand(tbBrand);
    }

    /**
     * 修改状态
     * @param
     * @return
     */
    @PostMapping("/updateStatus")
    public R updateStatus(@RequestBody TbBrand tbBrand){
        return tbBrandService.updateStatus(tbBrand);
    }
}
